<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>我的订单-订单列表</title>
<link rel="stylesheet" href="__PUBLIC__/Mobile/css/zhanghou.css">
<script src="__PUBLIC__/Mobile/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/Common/Layer/layer.js"></script>
</head>

<body >
<section>
<!--我的订单-->
<div class="lm" style="position:fixed;">
  <a href="javascript:history.back(-1);">
    <img src="__PUBLIC__/Mobile/images/return.png" style="height:22px; padding-left:3%; line-height:22px; width:6%; padding-top:2%;" class="left">
  </a>
    <span class="left size20" style="width:85%;">我的订单 </span>
</div>
<div class="Order-form s" style="position:fixed; margin-top: 49px; width:100%;">
	<a href="{:U('Order/order_list')}" class="hover">全部</a>
	<a href="{:U('Order/payment_list')}">待付款</a>
	<a href="{:U('Order/receipt_goods')}">待收货</a>
	<a href="{:U('Order/payments_waite')}">待评价</a>
	<a href="{:U('Order/order_end')}">待完成</a>
<!--   <a href="#">退货/换货</a> -->
</div>

<div class="shopping-cart" style="padding-top:120px;">
<script>
  $(function(){
    
      $('.margin-top').each(function(){
          var  goods_num = 0;
          $(this).find('.goods_num').each(function(){
            goods_num += parseInt($(this).val());
          });
          $(this).find('.jian_nub').html(goods_num);
      })
  })
</script>

<foreach name="res" item="vo">
        <ul class="margin-top">
        	<h3 class="s"><span class="l">订单号:{$vo.orders_num}</span><span style="float:right;">待完成</span></h3>
          <foreach name="vo.result" item="rvo">
            <li>
            <a href="javascript:;">
            <b><img style="width:60px; height:60px; margin:5px;" src="__PUBLIC__/Uploads/goods/{$rvo.pic_url}"></b>
            <strong style="width:62%;">
            <p>{$rvo.goods_title}</p>
            </strong>
            <span><p>￥{$rvo.price_new}</p>
            <!-- <del class="gray">{$rvo.price_old}</del> -->
            <p class="gray">x{$rvo.goods_num}</p>
            <input type="hidden" class="goods_num" value="{$rvo.goods_num}">
            </span>
            </a>
            </li>
            </foreach>
          <p class="Subtotal"><span class="gray">小计(共<span class="jian_nub">1</span>件)：</span><span class="Orange size20">￥{$vo.price_sum}</span></span></p>
          <p class="confirm" style="border-bottom:1px solid #ccc; margin-bottom:10px;">
          	<span style="margin-left:20px;"> 下单时间 : {$vo.create_time|date="Y-m-d H:i:s",###}</span>
          </p>
          <p class="confirm">
              <a href="#" onclick="nextStep('{$vo.orders_num}')" class="hover">标记完成</a>
       </p>
    </ul>
</foreach>

<div style="text-align:center; padding:10px 0; margin-bottom:30px; font-size:14px;">没有更多数据了...</div>

<include file="Public:footer_orders" />



<script>
function nextStep(o){
	//询问框
layer.confirm('点击后该订单('+o+')所有商品不可退货，积分返利立即到账，是否同意？', {
  btn: ['同意','不同意'], //按钮
  title: '莫宁商城提醒您', 
}, function(){
  $.post("{:U('Order/order_end')}",{'orders_num':o},function(data){
					if(data==1){
						parent.layer.msg("订单奖励已发放！");
						location.reload(true);
					}else{
						parent.layer.msg("出错了，请稍后再试！");
					}
				})
}, function(){
});
}
</script>
</div>
</section>
</body>
</html>
